﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BussinessLogicLayer.ChucNangGV;
using BussinessLogicLayer.ChucNangGV.CaiDat;
using BussinessLogicLayer.ChucNangQLDaoTao;
using BussinessLogicLayer.ChucNangQLDaoTao.CaiDat;
using BussinessLogicLayer.ChucNangQLKhoa;
using BussinessLogicLayer.ChucNangQLKhoa.CaiDat;
using BussinessLogicLayer.ChucNangSV;
using BussinessLogicLayer.ChucNangSV.CaiDat;

namespace BussinessLogicLayer
{
    public class CNFactory
    {
        public static Object LayChucNang(ChucNang chucNang)
        {
            if (chucNang == ChucNang.QuanLyKhoa) return CNQuanLyKhoa();
            if (chucNang == ChucNang.QuanLyDaoTao) return CNQuanLyDaoTao();
            if (chucNang == ChucNang.GiaoVien) return CNGiaoVien();
            if (chucNang == ChucNang.SinhVien) return CNSinhVien();
            if (chucNang == ChucNang.ThayDoiMatKhau) return CNThayDoiMatKhau();
            return null;
        }

        private static IThayDoiPass CNThayDoiMatKhau()
        {
            return new ThayDoiMatKhau();
        }

        private static ICNQuanLyDaoTao CNQuanLyDaoTao()
        {
            // Vd 
            // return new MyQuanLyDaoTao;
            return new CnQuanLyDaoTao();
        }

        private static ICNQuanLyKhoa CNQuanLyKhoa()
        {
            return new CnQuanLyKhoa();
        }

        private static ICnSinhVien CNSinhVien()
        {
            return new cnSinhVien();
        }

        private static ICNGiaoVien CNGiaoVien()
        {
            return new CnGiaoVienCaiDat();
        }

    }
}
